Imports System.Collections.Generic

Partial Class WebForm_SelfManageEnlistment_SearchEnlist
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.SqlDataSource1.SelectParameters("VolunteerID").DefaultValue = Context.User.Identity.Name
    End Sub

    Protected Sub gv_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gv.RowDataBound
        If e.Row.RowType = DataControlRowType.DataRow Then
            Dim hideStatus As HiddenField = TryCast(e.Row.FindControl("hideStatus"), HiddenField)
            Dim btnCancel As Button = TryCast(e.Row.FindControl("btnCancel"), Button)
            If hideStatus.Value <> "WA" Then
                btnCancel.Visible = False
            End If
        End If
    End Sub

    Protected Sub gv_RowUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) Handles gv.RowUpdated
        RaiseEvent Cancel(Me, New EventArgs)
    End Sub

    Public Event Cancel(ByVal sender As Object, ByVal e As System.EventArgs)

End Class